//
//  CSWGuide.m
//  网易彩票
//
//  Created by MAC on 16/6/17.
//  Copyright © 2016年 MAC. All rights reserved.
//

#import "CSWGuide.h"
#import "CSWSave.h"

#import "CSWTabBarController.h"
#import "CSWNewFeatureController.h"

@implementation CSWGuide

+ (UIViewController *)chooseWindowRootController{
    UIViewController *rvc = [[UIViewController alloc] init];
    
    // 获取当前的最新版本号
    NSString *curVersion =  [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];
    
    // 获取上一次的版本号
    NSString *oldVersion = [CSWSave objectForKey:@"version"];
    
    if ([curVersion isEqualToString:oldVersion] == NO) {
        [CSWSave setObject:curVersion forKey:@"version"];

        rvc = [[CSWNewFeatureController alloc] init];
    }
    else    rvc = [[CSWTabBarController alloc] init];
    
    return rvc;
}

@end
